/**
 * 
 */
package com.cloud.pole.recharge.model;

import javax.annotation.Resource;
import com.cloud.pole.recharge.constant.RechargeConstant;
import lombok.Data;

/**
 * @author FrankChen
 *
 */
@Data
public class CommonMsg20210301 {
	@Resource
	RechargeConstant chargeConstant; 
	
	public static final String RESULT_CODE_SUCCEED = "0";
	public static final String RESULT_CODE_ERROR = "1";
	
	// 4.1外部渠道精准营销推荐
	public static final String IOP_HT_TRIGGEREXT = "IOP_HT_TriggerExt";
	// 4.2产品元素推荐
	public static final String DQ_HQ_HNAN_QUERY_DISCNT_OUT = "DQ_HQ_HNAN_QueryDiscntOut";	
	// 4.3短信验证码下发
	public static final String DQ_HT_HNAN_SEND_SMS_VERIFY_CODE_OUT = "DQ_HT_HNAN_sendSmsVerifyCodeOut";
	// 4.4短信验证码校验
	public static final String DQ_HT_HNAN_CHECK_SMS_VERIFY_CODE_OUT = "DQ_HT_HNAN_checkSmsVerifyCodeOut";
	// 4.5产品/优惠受理
	public static final String DQ_HT_HNAN_PRODUCT_CHANGE_OUT = "DQ_HT_HNAN_ProductChangeOut";
	// 4.6存费活动受理
	public static final String DQ_HT_HNAN_BANK_RECVFEE_OUT = "DQ_HT_HNAN_BankRecvFeeOut";
	// 4.7获取支付流水号
	public static final String DQ_ZF_BUILD_SEQ = "DQ_ZF_BUILD_SEQ";
	// 4.8获取支付链接 
	public static final String TYZF_HT_UNIFIEDPAY_DETAIL = "TYZF_HT_UnifiedPayDetail";
	// 4.10未支付订单取消接口
	public static final String DQ_ZF_CANCEL_TRADE = "DQ_ZF_CancelTrade";
	// 4.11支付预受理订单归档
	public static final String DQ_ZF_PAY_SUCC_FUNC = "DQ_ZF_paySuccFunc";
	// 4.12支付结果查询
	public static final String DQ_ZF_QRY_PAY_RESULT = "DQ_ZF_qryPayResult";
	// 4.13号卡预约订单同步
	public static final String DQ_HT_HNAN_PRE_ORDER_FOROUTER = "DQ_HT_HNAN_PreOrderForOuter";
	// 4.14互联网渠道客户证件号码校验
	public static final String DQ_HQ_HNAN_CHECK_IDANDCARINFO = "DQ_HQ_HNAN_checkIdandCarinfo";
	// 4.16互联网渠道选号
	public static final String DQ_HQ_HNAN_QUERY_OUT_NUM_INFO = "DQ_HQ_HNAN_queryOutNumInfo";
	// 4.17互联网渠道号码选占接口
	public static final String DQ_HT_HNAN_SEL_TEMP_OCCUPY_RESOUT = "DQ_HT_HNAN_SelTempOccupyResOut";

															   
	// 全网信用购机活动列表查询接口                                                                                                                                                                
	public static final String DQ_HQ_HNAN_WHOLENETLISTOUT = "DQ_HQ_HNAN_WholeNetListOut";
	// 全网信用购机活动详情查询接口
	public static final String DQ_HQ_HNAN_WHOLENETDESCOUT = "DQ_HQ_HNAN_WholeNetDescOut";
	//全网信用购机活动终端串号校验接口
	public static final String DQ_HQ_HNAN_CHKWHOLENETTERMINALOUT = "DQ_HQ_HNAN_ChkWholeNetTerminalOut";
	//全网信用购机活动受理接口
	public static final String DQ_HT_HNAN_ORDERWHOLENETTRADEOUT = "DQ_HT_HNAN_OrderWholeNetTradeOut";

	
	// 产品变更
	public static final String TRADE_TYPE_CODE_YWBG = "110";
	// 营销活动
	public static final String TRADE_TYPE_CODE_YXHD = "240";
	
	/**
	 * 2.6接入方式编码
	 */
	public static final String IN_MODE_CODE_ELSE = "O";
	public static final String IN_MODE_CODE_RECVFEEOUT = "o";

	/******************* 必传参数 ***************************/
	/**
	 * API接口名称，参考各业务能力接口API定义
	 */
	private String method;
	/**
	 * 开放平台分配给应用的appId，创建应用时可获得
	 */
	private String appId;
	/**
	 * 渠道唯一流水
	 */
	private String flowdId;
	/**
	 * 省别编码
	 */
	private String provinceCode = "HNAN";
	/**
	 * 接入方式
	 */
	private String inModeCode = "0";
	/**
	 * 员工所在地州编码，对于省集中的省份，填写“INTF。地州编码
	 */
	private String tradeEparchyCode = "0731";
//	private String tradeEparchyCode = "07XX";
	
	/**
	 * 员工所在业务区编码。业务区编码
	 */
	private String tradeCityCode = "INTF";
//	private String tradeCityCode = "A311";
	
	/**
	 * 员工所在的部门
	 */
	private String tradeDepartId;
	/**
	 * 员工标识。员工编码
	 */
	private String tradeStaffId;
	/**
	 * 渠道接入密码 此密码由BOSS制定
	 */
	private String tradeDepartPasswd;

	/******************* 可选参数 ***************************/
	/**
	 * 时间戳，格式为yyyyMMddHHmmssSSS，例如：20130506135203528。
	 */
	private String timestamp;
	/**
	 * 可选，指定响应格式。默认json,可选值：json
	 */
	private String format = "json";
	/**
	 * API协议版本
	 */
	private String version;
	/**
	 * 沙箱与正式环境切换标识，默认为1，可选0 0：沙箱环境 1：为正式环境
	 */
	private String status = "1";
	/**
	 * tradeDepartName
	 */
	private String tradeDepartName;
	/**
	 * tradeStaffName
	 */
	private String tradeStaffName;
	/**
	 * 路由地州编码
	 */
	private String routeEparchyCode;
	
	/**
	 * tradeTerminalId
	 */
	private String tradeTerminalId;

	private RechargeConstant smsProperties;;

	public CommonMsg20210301(String method) {
		// TODO Auto-generated constructor stub
		this.method = method;
	}
	
	/**
	 * 
	 * @return
	 */
	public String getLinkParameter() {
		StringBuffer str = new StringBuffer();
		str.append("method=");
		str.append(method);
		str.append("&appId=");
		str.append(appId);
		str.append("&flowdId=");
		str.append(flowdId);
		str.append("&PROVINCE_CODE=");
		str.append(provinceCode);
		str.append("&IN_MODE_CODE=");
		str.append(inModeCode);
		str.append("&TRADE_EPARCHY_CODE=");
		str.append(tradeEparchyCode);
		str.append("&TRADE_CITY_CODE=");
		str.append(tradeCityCode);
		str.append("&TRADE_DEPART_ID=");
		str.append(tradeDepartId);
		str.append("&TRADE_STAFF_ID=");
		str.append(tradeStaffId);
		str.append("&TRADE_DEPART_PASSWD=");
		str.append(tradeDepartPasswd);
		str.append("&TRADE_TERMINAL_ID=");
		str.append(tradeTerminalId);
		return str.toString();
	}
}
